
"""
123
"""

import sys
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *


# 创建窗口
class SnakeGame(QMainWindow):

    def __init__(self):
        super().__init__()
        self.setWindowTitle("贪吃蛇")
        self.resize(640, 480)
        # 创建画画板 QFrame
        self.frame = GameFrame(self)
        # 设置到当前窗口
        self.setCentralWidget(self.frame)


class GameFrame(QFrame):

    def __init__(self, parent: QWidget):
        super().__init__(parent)


if __name__ == "__main__":

    app = QApplication(sys.argv)
    game = SnakeGame()
    game.show()
    # 让主程序阻塞运行
    sys.exit(app.exec_())
